package com.Exception;
class WrongInputException extends Exception{
    public WrongInputException(String s){
        super(s);
    }
}
class Input{
    void method() throws WrongInputException {
        throw new WrongInputException("Wrong input"); // 抛出自定义的类
    }
}
public class TestInput {
    public static void main(String[] args){
        try{
            new Input().method();
        }catch(WrongInputException wie){
            System.out.println(wie.getMessage());
        }
    }
}
